<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'form-thongbaomoithau',
    'enableClientValidation' => true,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    ),
        ));
?>
<div class="form-group">
    <label class="control-label">Tên gói thầu</label>
    <?php echo $form->textField($model, 'tenGoiThau', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'tenGoiThau', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Ngành</label>
    <?php echo $form->dropDownList($model, 'nganh', CHtml::listData(DanhSachNganh::model()->findAll(), 'value', 'value'), array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'nganh', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Lĩnh vực</label>
    <?php echo $form->dropDownList($model, 'linhVuc', CHtml::listData(DanhSachLinhVuc::model()->findAll(), 'value', 'value'), array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'linhVuc', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Địa điểm</label>
    <?php echo $form->dropDownList($model, 'diaDiem', CHtml::listData(DiaDiem::model()->findAll(), 'value', 'value'), array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'diaDiem', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Tên dự án</label>
    <?php echo $form->textArea($model, 'tenDuAn', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'tenDuAn', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Nguồn vốn</label>
    <br>
    <?php echo $form->radioButtonList($model, 'nguonVon', array('Không xác định' => 'Không xác định', 'Trong nước' => 'Trong nước', 'Nước ngoài' => 'Nước ngoài'), array('labelOptions' => array('style' => 'display:inline'), 'separator' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')) ?>
    <?php echo $form->error($model, 'nguonVon', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Bên mời thầu</label>
    <?php echo $form->textArea($model, 'benMoiThau', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'benMoiThau', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Hình thức đấu thầu</label>
    <?php echo $form->dropDownList($model, 'hinhThuc', CHtml::listData(HinhThucDauThau::model()->findAll(), 'value', 'value'), array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'hinhThuc', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Thời gian bắt đầu bán HSMT</label>
    <?php
    Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
    $this->widget('CJuiDateTimePicker', array(
        'model' => $model,
        'attribute' => 'batDau',
        'language' => '',
        'htmlOptions' => array(
            'class' => 'form-control'
        ),
            )
    );
    ?>
    <?php echo $form->error($model, 'batDau', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Thời gian kết thúc bán HSMT</label>
    <?php
    Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
    $this->widget('CJuiDateTimePicker', array(
        'model' => $model,
        'attribute' => 'ketThuc',
        'language' => '',
        'htmlOptions' => array(
            'class' => 'form-control'
        ),
            )
    );
    ?>
    <?php echo $form->error($model, 'ketThuc', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Địa điểm bán</label>
    <?php echo $form->textArea($model, 'diaDiemBan', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'diaDiemBan', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Giá bán</label>
    <?php echo $form->textField($model, 'giaBan', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'giaBan', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Thời gian đóng thầu</label>
    <?php
    Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
    $this->widget('CJuiDateTimePicker', array(
        'model' => $model,
        'attribute' => 'thoiGianDongThau',
        'language' => '',
        'htmlOptions' => array(
            'class' => 'form-control'
        ),
            )
    );
    ?>
    <?php echo $form->error($model, 'thoiGianDongThau', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Ngày xuất bản</label>
    <?php
    Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
    $this->widget('CJuiDateTimePicker', array(
        'model' => $model,
        'attribute' => 'ngayXuatBan',
        'language' => '',
        'mode' => 'date',
        'htmlOptions' => array(
            'class' => 'form-control'
        ),
            )
    );
    ?>
    <?php echo $form->error($model, 'ngayXuatBan', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Số báo đăng</label>
    <?php echo $form->textField($model, 'soBaoDang', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'soBaoDang', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Tình trạng thông tin</label>
    <?php echo $form->textArea($model, 'tinhTrang', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'tinhTrang', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Mã thông tin</label>
    <?php echo $form->textField($model, 'maThongTin', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'maThongTin', array('class' => 'error-message')); ?>
</div>
<div class="form-group">
    <label class="control-label">Thông tin khác</label>
    <?php echo $form->textArea($model, 'thongTinKhac', array('class' => 'form-control')) ?>
    <?php echo $form->error($model, 'thongTinKhac', array('class' => 'error-message')); ?>
</div>
<div class="form-actions">
    <button type="submit" class="btn btn-primary">Lưu</button>
    <a href="<?php echo $this->createUrl('user/listnews') ?>" class="btn btn-default">Quay lại danh sách</a>
</div>
<?php $this->endWidget(); ?>